package com.zhangxu.microservice.system.web.response;

import com.zhangxu.microservice.system.dao.enums.ResourceTypeEnum;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

/**
 * 资源响应
 */
@Data
@Schema(description = "资源信息")
public class ResourceResp {

    @Schema(description = "资源ID", example = "1")
    private Long id;

    @Schema(description = "系统编码", example = "employee")
    private String applicationCode;

    @Schema(description = "资源编码", example = "USER_MANAGE")
    private String resourceCode;

    @Schema(description = "父级资源编码", example = "SYSTEM_MANAGE")
    private String parentResourceCode;

    @Schema(description = "资源名称", example = "用户管理")
    private String name;

    @Schema(description = "资源类型：DIRECTORY/MENU/BUTTON/API", example = "MENU")
    private ResourceTypeEnum type;

    @Schema(description = "前端路由路径或接口 URL", example = "/user/list")
    private String path;

    @Schema(description = "权限标识", example = "system:user:list")
    private String permission;

    @Schema(description = "前端组件路径", example = "system/user/index")
    private String component;

}